Embedding Multiset Constraints into a Lazy Functional Logic Language

نویسندگان

  • Puri Arenas
  • Francisco Javier López-Fraguas
  • Mario Rodrúguez-Arteljo
چکیده

1 I n t r o d u c t i o n The combination of different declarative paradigms (specially functional and logic programming) has been widely treated in the literature (see [12] for a survey). Many approaches to the integration of functional and logic programming take constructor-based conditional term rewriting systems as programs. In order to deal properly with non-strict functions, lazy functional logic languages use strict equality, which regards two expressions as equal iff they have the same constructor normal form. Moreover, lazy narrowing (a notion introduced in [20] and refined in [1,17]) is often chosen as the goal solving mechanism. As shown in [10], classical equational logic does not supply an adequate semantics for lazy functional logic programming, and a suitably defined constructor based rewriting logic provides a more convenient semantic framework. In two recent papers [3, 4] we have extended the approach from [10] with algebraic polymorphic types, i.e., parametric datatypes whose data constructors are governed by a given set C of equational axioms. The aim of the present paper is to investigate implementation techniques for an extended instance of the framework from [3, 4]. More precisely, we consider a language Seta 1 which provides the algebraic datatype Mset(a), the data constructors ~ ]~ :-+ Mset(a) (to build the empty multiset) and ~ "1"9 : (a, Mset(a)) -+ Mset(a) (to add an element to a multiset), required to fulfill the equational * This research has been partially supported by the the Spanish National Project TIC95-0433-C03-01 "CPD" and the Esprit Bt~A Working Group EP-22457 "CCLIr'. 1 Seta is not an acronym, but simply the spanish word for mushroom.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Real Constraints within a Functional Logic Language

We present a declarative language { CFLP(R) { which integrates lazy functional programming, logic programming and constraint solving over real numbers. Both a (higher order, polymorphic, lazy) functional language and (pure) CLP(R) can be isolated as subsets of our language. Through several examples we attempt to demonstrate the interest of CFLP(R). The execution mechanism of the language consis...

متن کامل

Implementing a Lazy Functional Logic Language with Disequality Constraints

In this paper, we investigate an implementation of a lazy functional logic language (in particular the language BABEL MR88, MR92]) which uses disequality constraints for solving equations and building answers. We specify a new operational semantics which combines lazy narrowing with disequality constraints and we deene an abstract machine tailored to the execution of BABEL programs according to...

متن کامل

Toy(FD): Sketch of Operational Semantics

In [2] we proposed the integration of finite domain (FD) constraints into the functional logic programming language TOYand, as result, presented the language TOY(FD) . We showed that TOY(FD) integrates the best features of existing functional and logic languages into FD constraint solving. This paper describes a sketch (due to space limitations) of the TOY(FD) operational semantics that consist...

متن کامل

Implementing Disequality in the Lazy Functional Logic Language Babel

x Abstract In this paper 1 , we investigate an implementation of a lazy functional logic language (in particular the language BABEL MR88,MR92]) which uses disequality constraints for solving equations and building answers. We specify a new operational semantics which combines lazy narrowing with disequality constraints and we deene an abstract machine tailored to the execution of BABEL programs...

متن کامل

Functional Reading of Logic Programs

We propose an embedding of logic programming into lazy functional programming in which each predicate in a Prolog program becomes a Haskell function, in such a way that both the declarative and the procedural reading of the Prolog predicate are preserved. The embedding computes by means of operations on lazy lists. The state of each step in computation is passed on as a stream of answer substit...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998